#pragma once

namespace Scythe {
typedef float mat4_t[16];

void mat4_Mult(const mat4_t a, const mat4_t b, mat4_t &product);
void nx34ToMat4(mat4_t &dst, const Mat33 src, const Vec3 srcpos);
void nx33ToMat4(float* dst, const Mat33 src);
void mat4ToNx33(const float* m, Mat33 &m33);
void nx33ToMat4nt(float* dst, const Mat33 src);	//not transposed
void nx33ToMat34nt(float* dst, const Mat33 src);	//not transposed
void mat4ToNx33nt(const float* m, Mat33 &m33);
void mat4Ident(float* m);
void mat34Ident(float* m);

void matNxToVec(const Mat33 m, Vec3 &v1, Vec3 &v2, Vec3 &v3);
void nxVecToMat(const Vec3 v1, const Vec3 v2, const Vec3 v3, Mat33 &m);
void mat33RotateGlobal(float angle, float x, float y, float z, Mat33 &m);
void rotateAxis(Vec3 &v, float x, float y, float z, float angle);
//Novode mat33 version of axis rotate
void mat33Rotate(float angle, float x, float y, float z, Mat33 &nm);
float getAngle(const Vec3 axis, const Vec3 v1o, const Vec3 v2o);

namespace miniMath
{
	#ifndef PI
	#define PI	(3.141592654f)
	#endif

	// degrees to radians multiplier
	// eg radians = degrees * DEG2RAD;
	#ifndef DEG2RAD
	#define DEG2RAD (0.017453292f)
	#endif

	// degrees = radians * RAD2DEG;
	#ifndef RAD2DEG
	#define RAD2DEG	(57.29577951f)
	#endif
}

}